import comfy.sd
from comfy.model_management import get_torch_device
from comfy.model_patcher import ModelPatcher
from server import PromptServer
from aiohttp import web
import uuid
class TextInputNode:
    """
    带前端交互的文本输入节点
    输入值可通过前端实时更新
    """
    CATEGORY = "Marvelous Tools"

    @classmethod
    def INPUT_TYPES(cls):
        return {
            "required": {
                "prompt_text": ("STRING", {
                "default": "",
            }),
            }
        }



    RETURN_TYPES = ("STRING",)
    RETURN_NAMES = ("text",)
    FUNCTION = "process"

    def process(self, prompt_text):
        return (prompt_text,)